package com.generator.aboutUser.user.service.impl;

import com.generator.aboutUser.user.dao.UsersMapper;
import com.generator.aboutUser.user.pojo.Users;
import com.generator.aboutUser.user.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @version 1.0
 * @auther wumei
 * @date 2022/10/01
 * 星期六 14:56
 */
@Service
public class UserService implements IUserService {

    @Autowired
    private UsersMapper usersMapper;


    public UsersMapper getUsersMapper() {
        return usersMapper;
    }
    public void setUsersMapper(UsersMapper usersMapper) {
        this.usersMapper = usersMapper;
    }

    /**
     * 登录
     * @param user
     * @return 用户信息
     */
    @Transactional
    @Override
    public Users login(Users user) {
        return usersMapper.queryUser(user);
    }
}
